import random
import string
# 给定随机字符的范围
data = string.ascii_lowercase + string.digits + string.ascii_uppercase + string.hexdigits
# 定义一个空字符串做拼接使用
def randomString():
    random_string = ""
    for i in range(50):
        random_string += random.choice(data)
    print(random_string)
if __name__ == '__main__':
    randomString()